Video compression format

A video compression format or a video compression specification is a specification for digitally representing a video as a file or a bitstream. Examples of video compression formats are MPEG-2 Part 2, MPEG-4 Part 2, H.264 (MPEG-4 Part 10), Theora, Dirac, RealVideo RV40, and VP8. A specific software or hardware implementation of video compression and/or decompression using a specific video compression format is called a video codec; an example of a video codec is Xvid, which implements encoding and decoding videos using the MPEG-4 Part 2 video compression format in software.

A video encoded according to a video compression format is normally bundled with an audio stream (encoded using an audio compression format) inside a multimedia container format such as AVI, MP4, FLV, RealMedia, or Matroska. As such, the user normally doesn't have a H.264 file, but instead has a .mp4 file, which is an MP4 container containing H.264-encoded video, normally alongside AAC-encoded audio. Multimedia container formats can contain any one of a number of different video compression formats; for example the MP4 container format can contain video in either the MPEG-2 Part 2 or the H.264 video compression format, among others. Another example is the file type WebM, which specifies the container format (Matroska), but also exactly which video (VP8) and audio (Vorbis) compression format is used inside the Matroska container, even though the Matroska container format itself is capable of containing other video compression formats.